Problem: $f(x, y, z) = \left( xyz, 3y^2, 5(x + z) \right)$ What is the divergence of $f$ at $\left( 2, -1, 3 \right)$ ?
Solution: The formula for divergence in three dimensions is $\text{div}(f) = \dfrac{\partial P}{\partial x} + \dfrac{\partial Q}{\partial y} + \dfrac{\partial R}{\partial z}$, where $P$ is the $x$ -component of $f$, $Q$ is the $y$ -component, and $R$ is the $z$ -component. Let's differentiate! $\begin{aligned} \dfrac{\partial P}{\partial x} &= \dfrac{\partial}{\partial x} \left[ xyz \right] \\ \\ &= yz \\ \\ \dfrac{\partial Q}{\partial y} &= \dfrac{\partial}{\partial y} \left[ 3y^2 \right] \\ \\ &= 6y \\ \\ \dfrac{\partial R}{\partial z} &= \dfrac{\partial}{\partial z} \left[ 5(x + z) \right] \\ \\ &= 5 \end{aligned}$ Adding the three partial derivatives, $\text{div}(f) = yz + 6y + 5$. The divergence of $f$ at $(2, -1, 3)$ is $-4$.